home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / swag / comm.swg / 0065_FrontDoor INBOUND-OUTBOUND.HIS Files.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-03-26  |  2.7 KB  |  102 lines

  1. {
  2. From: edwin@mavetju.iaehv.nl (Edwin Groothuis)
  3.  
  4. > Anybody know the structure to FrontDoor's INBOUND.HIS and
  5. > OUTBOUND.HIS files? Thanks..
  6. }
  7.  
  8. program   MailHistory;
  9. uses      crt,dos;
  10.  
  11. TYPE
  12.   MailHistRec = RECORD
  13.     Year,                        (* 1990 - xxxx *)
  14.     Month,                       (* 1 - 12 *)
  15.     Day,                         (* 1 - 31 *)
  16.     Hour,                        (* 0 - 23 *)
  17.     Minute,                      (* 0 - 59 *)
  18.     Second,                      (* 0 - 59 *)
  19.     Zone,
  20.     Net,
  21.     Node,
  22.     Point     : word;
  23.     SystemName: string[30];
  24.     Location  : string[38];
  25.     TimeOnLine: word;            (* Seconds spent on-line *)
  26.     RcvdBytes,
  27.     SentBytes : longint;
  28.     Cost      : word;
  29.   End;
  30.  
  31. var       fin:file of mailhistrec;
  32.           fout:text;
  33.           hist:mailhistrec;
  34.           rcvd,send:longint;
  35.  
  36. begin
  37.   assign(fout,paramstr(1));rewrite(fout);
  38.   assign(fin,'outbound.his');{$I-}reset(fin);{$I+}
  39.   if ioresult=0 then
  40.   begin
  41.     read(fin,hist);
  42.     if not eof(fin) then
  43.     begin
  44.       writeln(fout,'OUTBOUND   | nodenumber              | rcvd    | send   
  45. |');
  46.  
  47. writeln(fout,'-----------+-------------------------+---------+---------+');
  48.       rcvd:=0;send:=0;
  49.       while not eof(fin) do
  50.       begin
  51.         read(fin,hist);
  52.         with hist do
  53.         begin
  54.           writeln(fout,day:2,'/',month:2,'/',year:2,' |
  55. ',zone:5,':',net:5,'/',node:5,'.',point:5,' | ',
  56.                   rcvdbytes:7,' | ',sentbytes:7,' |');
  57.           inc(rcvd,rcvdbytes);inc(send,sentbytes);
  58.         end;
  59.       end;
  60.      
  61. writeln(fout,'-----------+-------------------------+---------+---------+');
  62.       writeln(fout,'                                     | ',rcvd:7,' |
  63. ',send:7,' |');
  64.       writeln(fout,' ');
  65.     end;
  66.   end;
  67.   close(fin);
  68.  
  69.  
  70.   assign(fin,'inbound.his');{$I-}reset(fin);{$I+}
  71.   if ioresult=0 then
  72.   begin
  73.     read(fin,hist);
  74.     if not eof(fin) then
  75.     begin
  76.       writeln(fout,'INBOUND    | nodenumber              | rcvd    | send   
  77. |');
  78.      
  79. writeln(fout,'-----------+-------------------------+---------+---------+');
  80.       rcvd:=0;send:=0;
  81.       while not eof(fin) do
  82.       begin
  83.         read(fin,hist);
  84.         with hist do
  85.         begin
  86.           writeln(fout,day:2,'/',month:2,'/',year:2,' |
  87. ',zone:5,':',net:5,'/',node:5,'.',point:5,' | ',
  88.                   rcvdbytes:7,' | ',sentbytes:7,' |');
  89.           inc(rcvd,rcvdbytes);inc(send,sentbytes);
  90.         end;
  91.       end;
  92.      
  93. writeln(fout,'-----------+-------------------------+---------+---------+');
  94.       writeln(fout,'                                     | ',rcvd:7,' |
  95. ',send:7,' |');
  96.       writeln(fout,' ');
  97.     end;
  98.   end;
  99.   close(fin);
  100.   close(fout);
  101. end.
  102.